﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace GA_SCHED_DESIGNER
{
    /// <summary>
    /// Interaction logic for SchedWindow.xaml
    /// </summary>
    public partial class SchedWindow : Window
    {
        public SchedWindow()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(SchedWindow_Loaded);
        }

        void SchedWindow_Loaded(object sender, RoutedEventArgs e)
        {
//            context = new Acceron.University.DBAccess.CRM_University_GADataContext();
            //this.dataGrid1.ItemsSource = context.Classes;

            //CourseCol.ItemsSource = context.Courses;
            //CourseCol.DisplayMemberPath = "Name";
            //CourseCol.SelectedValuePath = "Course_ID";

            //ProfCol.ItemsSource = context.Professors;
            //ProfCol.DisplayMemberPath = "Name";
            //ProfCol.SelectedValuePath = "Prof_ID";

            //GroupCol.ItemsSource = context.Groups;
            //GroupCol.DisplayMemberPath = "Name";
            //GroupCol.SelectedValuePath = "Group_ID";
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ((Acceron.University.DBAccess.CRM_University_GADataContext)this.Resources["dbConetxtKey"]).SubmitChanges();
            
            DialogResult = true;
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }
    }
}
